/*
 * Created on Oct 22, 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package com.hermeneute.fsa;



/**
 * @author mauceri
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class FSTSequentialBigCompiledState implements FSTSequentialCompiledState {

	/* (non-Javadoc)
	 * @see com.hermeneute.fst.FSTSerialCompiledState#nextState(char)
	 */
	FSTCompiledTransition table[];
	public FSTSequentialBigCompiledState(FSTTransitionIterator it, int idx[]){
		table = new FSTCompiledTransition[idx.length];
		for (int i = 0; i < idx.length; i++)
			table[idx.length] = null;
		while(it.hasNext()){
			it.next();
			table[idx[(int)it.getEvent().getIn()]] =
				new FSTCompiledTransition(
										it.getState(),
										it.getEvent().getOut());
		}
	}
	
	public FSTCompiledTransition nextState(int input) {
		// TODO Auto-generated method stub
		return table[input];
	}

	/* (non-Javadoc)
	 * @see com.hermeneute.fst.FSTSerialCompiledState#getType()
	 */
	public int getType() {
		// TODO Auto-generated method stub
		return FSTSequentialCompiledState.BIG_STATE;
	}

}
